
<form action="user" method="post">
    Name:  <input type="text" name="username" /><br />
    Email: <input type="text" name="email" /><br />
    <input type="submit" name="submit" value="Submit me!" />
</form>
<?php
require 'flight/Flight.php';

Flight::route('/', function(){
    echo "hello world!\n";
    var_dump($GLOBALS);
    // var_dump($_SERVER);
    // var_dump($_GET);
    // var_dump($_POST);
    // var_dump($_FILES);
    var_dump($_REQUEST);
});

Flight::route('/user', function(){
	var_dump($_POST);
	var_dump($_REQUEST);
	echo $_POST['username'];
	echo $_REQUEST['username'];
});

Flight::route('/user/[0-9]+', function(){
    echo 'hello user!';
});

Flight::start();
?>
